﻿Imports System.Threading

Public Class Form1
    Private WithEvents folderservices As FolderService
    Private hilo As Thread

    Private Sub Form1_FormClosing(sender As Object, e As FormClosingEventArgs) Handles Me.FormClosing
        Try
            Do
                hilo.Abort()
            Loop While hilo.IsAlive
        Catch ex As Exception
            MessageBox.Show(ex.Message, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error)
        End Try
    End Sub

    Private Sub Form1_Load(sender As Object, e As EventArgs) Handles MyBase.Load
        Dim winRar As New Compressor("WinRar", "rar.exe")

        'hilo = New Thread(AddressOf folderservices.Empezar)
        'hilo.Start()
    End Sub
End Class
